<!--
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2024-06-27 22:00:33
 * @LastEditTime: 2024-06-27 22:01:46
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \html\code\2_CSS\06_复合选择器\12_伪类选择器_否定伪类.html
 * @Description:
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪类选择器_否定伪类</title>
    <style>
        /* div>p:not(.fail) {
            color: red;
        } */

        /* div>p:not([title^="你要加"]) {
            color: red;
        } */

        div>p:not(:first-child) {
            color: red;
        }
    </style>
</head>

<body>
    <!-- 结构1 -->
    <div>
        <p>张三：98</p>
        <p>李四：88</p>
        <p>王五：78</p>
        <p>赵六：68</p>
        <p class="fail" title="你要加油啊！孙七">孙七：58</p>
        <p class="fail" title="你要加油啊！老八">老八：48</p>
    </div>
</body>

</html>